﻿@model pcObjectLibrary.UserObjLibrary
@{
    ViewBag.Title = "User Details";
}
@{ List<SelectListItem> accountType = new List<SelectListItem>();
   accountType.Add(new SelectListItem { Text = "Employee", Value = Convert.ToString((int)pcObjectLibrary.UserTypesEnum.Employee) });
   accountType.Add(new SelectListItem { Text = "Manager", Value = Convert.ToString((int)pcObjectLibrary.UserTypesEnum.Manager) });}
@*<hgroup class="title">
    <h1>@ViewBag.Title.</h1>
    <h2>You are at: @Html.DisplayTextFor(x => x.lastActivity_ip) @Html.Raw((string)ViewBag.Message)</h2>
</hgroup>*@
<div class="col-lg-6">
    <div class="well bs-component">
        @using (Ajax.BeginForm("Edit", "User", null,
                                new AjaxOptions { HttpMethod = "POST", OnSuccess = "postResponseRegistration" },
                                new { @class = "form-horizontal" }))
        {
            <fieldset>
                <legend>@ViewBag.Title</legend>
                @Html.HiddenFor(x => x.userId)
                <div class="form-group">
                    @Html.LabelFor(x => x.firstName, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-10">
                        @Html.TextBoxFor(x => x.firstName, new { @class = "form-control" })
                        @Html.ValidationMessageFor(x => x.firstName)
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(x => x.lastName, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-10">
                        @Html.TextBoxFor(x => x.lastName, new { @class = "form-control" })
                        @Html.ValidationMessageFor(x => x.lastName)
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(x => x.email, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-10">
                        @Html.TextBoxFor(x => x.email, new { @class = "form-control" })
                        @Html.ValidationMessageFor(x => x.email)
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(x => x.telephone, new { @class = "col-lg-2 control-label" })
                    <div class="col-lg-10">
                        @Html.TextBoxFor(x => x.telephone, new { @class = "form-control" })
                        @Html.ValidationMessageFor(x => x.telephone)
                    </div>
                </div>
                @*   <li>
                        @Html.LabelFor(x => x.password)
                        @Html.PasswordFor(x => x.password)
                        @Html.ValidationMessageFor(x => x.password)
                    </li>
                    <li>
                        @Html.LabelFor(x => x.registrationCode)
                        @Html.TextBoxFor(x => x.registrationCode)
                        @Html.ValidationMessageFor(x => x.registrationCode)
                    </li>*@
                @*  <li>
                        @Html.LabelFor(x => x.userTypeId)
                        @Html.DropDownListFor(x => x.userTypeId, (IEnumerable<SelectListItem>)accountType, "--Select--")
                        @Html.ValidationMessageFor(x => x.userTypeId)
                    </li>*@
                <div class="col-lg-10 col-lg-offset-2">
                    <input type="submit" value="Update" class="btn btn-primary" />
                </div>
            </fieldset>
        }
    </div>
</div>